package com.spring.gop.proj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.spring.gop.proj.interfaces.AdminDao;
import com.spring.gop.proj.interfaces.AdminService;
import com.spring.gop.proj.model.User;

@Service
public class AdminServiceImpl implements AdminService {

	@Autowired AdminDao adminDao;
	
	public List<User> allMember() {
		return adminDao.allMember();
	}
	public List<User> idList(String search_text){
		return adminDao.idList(search_text);
	}
	public List<User> nameList(String search_text){
		return adminDao.nameList(search_text);
	}
	public List<User> searchall(String search_text){
		return adminDao.searchall(search_text);
	}
	@Transactional
	public void delMember(String member_id) {
		adminDao.delMember(member_id);
		adminDao.updateDelMemberBuy(member_id);
		adminDao.updateDelMemberPoint(member_id);
		adminDao.updateDelMemberQna1(member_id);
		adminDao.updateDelMemberQna2(member_id);
	}
}
